<?php


$name       =   $_POST['name'];
$address    =   $_POST['address'];
$username   =   $_POST['username'];
$password   =   MD5($_POST['password']);
$email      =   $_POST['email'];
$contact    =   $_POST['contact'];


$admin_id = $_POST['admin_id'];


    include "db_connect.php";
    $query = "UPDATE `admins` SET  `id` = '$admin_id' , `name` =  '$name', `address` =  '$address', `username` =  '$username',
              `password` = '$password', `email` = '$email', `contact` = '$contact' where `id` = '$admin_id' ";
    if(mysql_query($query))
    header("location:../admin.php?page=admin_list");
        else{
        mysql_error();
        die("Update Failed");
        }

?>